package com.ejiaoyi.api.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 清标服务版本 枚举类
 *
 * @author unknownChivalrous
 * @since 2020-04-21
 */
public enum ClearBidServiceVersion {

    V1("62EBC6004B9A5BFCA6A6CCB1D0A24C2A");

    /**
     * 版本编码使用16位 UUID 大写
     */
    private final String code;

    ClearBidServiceVersion(String code) {
        this.code = code;
    }

    public static ClearBidServiceVersion getEnum(String code) {
        for (ClearBidServiceVersion clearBidServiceVersion : ClearBidServiceVersion.values()) {
            if (StringUtils.equals(clearBidServiceVersion.code, code)) {
                return clearBidServiceVersion;
            }
        }

        return null;
    }
}
